home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
pcl
/
docs.lha
/
cmu-user
/
cmu-user.toc
< prev
next >
Wrap
Text File
|
1992-07-15
|
17KB
|
248 lines
\contentsline {chapter}{\numberline {1}Introduction}{1}
\contentsline {section}{\numberline {1.1}Support}{1}
\contentsline {section}{\numberline {1.2}Local Distribution of CMU Common Lisp}{1}
\contentsline {section}{\numberline {1.3}Net Distribution of CMU Common Lisp}{2}
\contentsline {section}{\numberline {1.4}Source Availability}{2}
\contentsline {section}{\numberline {1.5}Command Line Options}{3}
\contentsline {section}{\numberline {1.6}Credits}{3}
\contentsline {chapter}{\numberline {2}Design Choices and Extensions}{5}
\contentsline {section}{\numberline {2.1}Data Types}{5}
\contentsline {subsection}{\numberline {2.1.1}Symbols}{5}
\contentsline {subsection}{\numberline {2.1.2}Integers}{5}
\contentsline {subsection}{\numberline {2.1.3}Floats}{5}
\contentsline {subsubsection}{\numberline {2.1.3.1}IEEE Special Values}{5}
\contentsline {subsubsection}{\numberline {2.1.3.2}Negative Zero}{6}
\contentsline {subsubsection}{\numberline {2.1.3.3}Denormalized Floats}{6}
\contentsline {subsubsection}{\numberline {2.1.3.4}Floating Point Exceptions}{6}
\contentsline {subsubsection}{\numberline {2.1.3.5}Floating Point Rounding Mode}{7}
\contentsline {paragraph}{Warning:}{7}
\contentsline {subsubsection}{\numberline {2.1.3.6}Accessing the Floating Point Modes}{7}
\contentsline {subsection}{\numberline {2.1.4}Characters}{8}
\contentsline {subsection}{\numberline {2.1.5}Array Initialization}{8}
\contentsline {section}{\numberline {2.2}Default Interrupts for Lisp}{8}
\contentsline {section}{\numberline {2.3}Packages}{8}
\contentsline {section}{\numberline {2.4}The Editor}{9}
\contentsline {section}{\numberline {2.5}Garbage Collection}{9}
\contentsline {section}{\numberline {2.6}Describe}{10}
\contentsline {section}{\numberline {2.7}The Inspector}{11}
\contentsline {subsection}{\numberline {2.7.1}The Windowing Inspector}{11}
\contentsline {subsection}{\numberline {2.7.2}The TTY Inspector}{12}
\contentsline {section}{\numberline {2.8}Load}{12}
\contentsline {section}{\numberline {2.9}The Reader}{13}
\contentsline {section}{\numberline {2.10}Running Programs from Lisp}{13}
\contentsline {subsection}{\numberline {2.10.1}Process Accessors}{14}
\contentsline {section}{\numberline {2.11}Saving a Core Image}{16}
\contentsline {section}{\numberline {2.12}Search Lists}{16}
\contentsline {subsection}{\numberline {2.12.1}Search List Example}{17}
\contentsline {section}{\numberline {2.13}Time Parsing and Formatting}{17}
\contentsline {section}{\numberline {2.14}Lisp Library}{18}
\contentsline {chapter}{\numberline {3}The Debugger}{20}
\contentsline {section}{\numberline {3.1}Debugger Introduction}{20}
\contentsline {section}{\numberline {3.2}The Command Loop}{21}
\contentsline {section}{\numberline {3.3}Stack Frames}{21}
\contentsline {subsection}{\numberline {3.3.1}Stack Motion}{21}
\contentsline {subsection}{\numberline {3.3.2}How Arguments are Printed}{21}
\contentsline {subsection}{\numberline {3.3.3}Function Names}{22}
\contentsline {subsection}{\numberline {3.3.4}Funny Frames}{23}
\contentsline {subsection}{\numberline {3.3.5}Debug Tail Recursion}{23}
\contentsline {subsection}{\numberline {3.3.6}Unknown Locations and Interrupts}{24}
\contentsline {section}{\numberline {3.4}Variable Access}{24}
\contentsline {subsection}{\numberline {3.4.1}Variable Value Availability}{25}
\contentsline {subsection}{\numberline {3.4.2}Note On Lexical Variable Access}{25}
\contentsline {section}{\numberline {3.5}Source Location Printing}{25}
\contentsline {subsection}{\numberline {3.5.1}How the Source is Found}{26}
\contentsline {subsection}{\numberline {3.5.2}Source Location Availability}{27}
\contentsline {section}{\numberline {3.6}Compiler Policy Control}{27}
\contentsline {section}{\numberline {3.7}Exiting Commands}{28}
\contentsline {section}{\numberline {3.8}Information Commands}{28}
\contentsline {section}{\numberline {3.9}Breakpoint Commands}{29}
\contentsline {subsection}{\numberline {3.9.1}Breakpoint Example}{29}
\contentsline {section}{\numberline {3.10}Function Tracing}{30}
\contentsline {subsection}{\numberline {3.10.1}Encapsulation Functions}{32}
\contentsline {section}{\numberline {3.11}Specials}{32}
\contentsline {chapter}{\numberline {4}The Compiler}{33}
\contentsline {section}{\numberline {4.1}Compiler Introduction}{33}
\contentsline {section}{\numberline {4.2}Calling the Compiler}{33}
\contentsline {section}{\numberline {4.3}Compilation Units}{35}
\contentsline {subsection}{\numberline {4.3.1}Undefined Warnings}{35}
\contentsline {subsection}{\numberline {4.3.2}Context Declarations}{36}
\contentsline {subsection}{\numberline {4.3.3}Context Declaration Example}{36}
\contentsline {section}{\numberline {4.4}Interpreting Error Messages}{37}
\contentsline {subsection}{\numberline {4.4.1}The Parts of the Error Message}{37}
\contentsline {subsection}{\numberline {4.4.2}The Original and Actual Source}{39}
\contentsline {subsection}{\numberline {4.4.3}The Processing Path}{39}
\contentsline {subsection}{\numberline {4.4.4}Error Severity}{40}
\contentsline {subsection}{\numberline {4.4.5}Errors During Macroexpansion}{40}
\contentsline {subsection}{\numberline {4.4.6}Read Errors}{40}
\contentsline {subsection}{\numberline {4.4.7}Error Message Parameterization}{41}
\contentsline {section}{\numberline {4.5}Types in Python}{42}
\contentsline {subsection}{\numberline {4.5.1}Compile Time Type Errors}{42}
\contentsline {subsection}{\numberline {4.5.2}Precise Type Checking}{43}
\contentsline {subsection}{\numberline {4.5.3}Weakened Type Checking}{43}
\contentsline {section}{\numberline {4.6}Getting Existing Programs to Run}{44}
\contentsline {section}{\numberline {4.7}Compiler Policy}{46}
\contentsline {subsection}{\numberline {4.7.1}The Optimize Declaration}{46}
\contentsline {subsection}{\numberline {4.7.2}The Optimize-Interface Declaration}{46}
\contentsline {section}{\numberline {4.8}Open Coding and Inline Expansion}{47}
\contentsline {chapter}{\numberline {5}Advanced Compiler Use and Efficiency Hints}{48}
\contentsline {section}{\numberline {5.1}Advanced Compiler Introduction}{48}
\contentsline {subsection}{\numberline {5.1.1}Types}{48}
\contentsline {subsection}{\numberline {5.1.2}Optimization}{48}
\contentsline {subsection}{\numberline {5.1.3}Function Call}{49}
\contentsline {subsection}{\numberline {5.1.4}Representation of Objects}{50}
\contentsline {subsection}{\numberline {5.1.5}Writing Efficient Code}{50}
\contentsline {section}{\numberline {5.2}More About Types in Python}{50}
\contentsline {subsection}{\numberline {5.2.1}More Types Meaningful}{51}
\contentsline {subsection}{\numberline {5.2.2}Canonicalization}{51}
\contentsline {subsection}{\numberline {5.2.3}Member Types}{51}
\contentsline {subsection}{\numberline {5.2.4}Union Types}{52}
\contentsline {subsection}{\numberline {5.2.5}The Empty Type}{52}
\contentsline {subsection}{\numberline {5.2.6}Function Types}{52}
\contentsline {subsection}{\numberline {5.2.7}The Values Declaration}{53}
\contentsline {subsection}{\numberline {5.2.8}Structure Types}{54}
\contentsline {subsection}{\numberline {5.2.9}The Freeze-Type Declaration}{54}
\contentsline {subsection}{\numberline {5.2.10}Type Restrictions}{54}
\contentsline {subsection}{\numberline {5.2.11}Type Style Recommendations}{55}
\contentsline {section}{\numberline {5.3}Type Inference}{55}
\contentsline {subsection}{\numberline {5.3.1}Variable Type Inference}{56}
\contentsline {subsection}{\numberline {5.3.2}Local Function Type Inference}{56}
\contentsline {subsection}{\numberline {5.3.3}Global Function Type Inference}{56}
\contentsline {subsection}{\numberline {5.3.4}Operation Specific Type Inference}{57}
\contentsline {subsection}{\numberline {5.3.5}Dynamic Type Inference}{57}
\contentsline {subsection}{\numberline {5.3.6}Type Check Optimization}{58}
\contentsline {section}{\numberline {5.4}Source Optimization}{59}
\contentsline {subsection}{\numberline {5.4.1}Let Optimization}{60}
\contentsline {subsection}{\numberline {5.4.2}Constant Folding}{61}
\contentsline {subsection}{\numberline {5.4.3}Unused Expression Elimination}{61}
\contentsline {subsection}{\numberline {5.4.4}Control Optimization}{61}
\contentsline {subsection}{\numberline {5.4.5}Unreachable Code Deletion}{62}
\contentsline {subsection}{\numberline {5.4.6}Multiple Values Optimization}{64}
\contentsline {subsection}{\numberline {5.4.7}Source to Source Transformation}{64}
\contentsline {subsection}{\numberline {5.4.8}Style Recommendations}{65}
\contentsline {section}{\numberline {5.5}Tail Recursion}{65}
\contentsline {subsection}{\numberline {5.5.1}Tail Recursion Exceptions}{67}
\contentsline {section}{\numberline {5.6}Local Call}{67}
\contentsline {subsection}{\numberline {5.6.1}Self-Recursive Calls}{67}
\contentsline {subsection}{\numberline {5.6.2}Let Calls}{67}
\contentsline {subsection}{\numberline {5.6.3}Closures}{68}
\contentsline {subsection}{\numberline {5.6.4}Local Tail Recursion}{68}
\contentsline {subsection}{\numberline {5.6.5}Return Values}{69}
\contentsline {section}{\numberline {5.7}Block Compilation}{69}
\contentsline {subsection}{\numberline {5.7.1}Block Compilation Semantics}{70}
\contentsline {subsection}{\numberline {5.7.2}Block Compilation Declarations}{70}
\contentsline {subsection}{\numberline {5.7.3}Compiler Arguments}{71}
\contentsline {subsection}{\numberline {5.7.4}Practical Difficulties}{71}
\contentsline {section}{\numberline {5.8}Inline Expansion}{72}
\contentsline {subsection}{\numberline {5.8.1}Inline Expansion Recording}{73}
\contentsline {subsection}{\numberline {5.8.2}Semi-Inline Expansion}{73}
\contentsline {subsection}{\numberline {5.8.3}The Maybe-Inline Declaration}{73}
\contentsline {section}{\numberline {5.9}Object Representation}{74}
\contentsline {subsection}{\numberline {5.9.1}Think Before You Use a List}{75}
\contentsline {subsection}{\numberline {5.9.2}Structures}{75}
\contentsline {subsection}{\numberline {5.9.3}Arrays}{75}
\contentsline {subsection}{\numberline {5.9.4}Vectors}{75}
\contentsline {subsection}{\numberline {5.9.5}Bit-Vectors}{76}
\contentsline {subsection}{\numberline {5.9.6}Hashtables}{76}
\contentsline {section}{\numberline {5.10}Numbers}{76}
\contentsline {subsection}{\numberline {5.10.1}Descriptors}{77}
\contentsline {subsection}{\numberline {5.10.2}Non-Descriptor Representations}{77}
\contentsline {subsection}{\numberline {5.10.3}Variables}{78}
\contentsline {subsection}{\numberline {5.10.4}Generic Arithmetic}{78}
\contentsline {subsection}{\numberline {5.10.5}Fixnums}{79}
\contentsline {subsection}{\numberline {5.10.6}Word Integers}{80}
\contentsline {subsection}{\numberline {5.10.7}Floating Point Efficiency}{80}
\contentsline {subsection}{\numberline {5.10.8}Specialized Arrays}{80}
\contentsline {subsection}{\numberline {5.10.9}Interactions With Local Call}{81}
\contentsline {subsection}{\numberline {5.10.10}Representation of Characters}{81}
\contentsline {section}{\numberline {5.11}General Efficiency Hints}{81}
\contentsline {subsection}{\numberline {5.11.1}Compile Your Code}{81}
\contentsline {subsection}{\numberline {5.11.2}Avoid Unnecessary Consing}{82}
\contentsline {subsection}{\numberline {5.11.3}Complex Argument Syntax}{82}
\contentsline {subsection}{\numberline {5.11.4}Mapping and Iteration}{83}
\contentsline {subsection}{\numberline {5.11.5}Trace Files and Disassembly}{83}
\contentsline {section}{\numberline {5.12}Efficiency Notes}{84}
\contentsline {subsection}{\numberline {5.12.1}Type Uncertainty}{84}
\contentsline {subsection}{\numberline {5.12.2}Efficiency Notes and Type Checking}{84}
\contentsline {subsection}{\numberline {5.12.3}Representation Efficiency Notes}{85}
\contentsline {subsection}{\numberline {5.12.4}Verbosity Control}{86}
\contentsline {section}{\numberline {5.13}Profiling}{86}
\contentsline {subsection}{\numberline {5.13.1}Profile Interface}{87}
\contentsline {subsection}{\numberline {5.13.2}Profiling Techniques}{87}
\contentsline {subsection}{\numberline {5.13.3}Nested or Recursive Calls}{87}
\contentsline {subsection}{\numberline {5.13.4}Clock resolution}{87}
\contentsline {subsection}{\numberline {5.13.5}Profiling overhead}{88}
\contentsline {subsection}{\numberline {5.13.6}Additional Timing Utilities}{88}
\contentsline {subsection}{\numberline {5.13.7}A Note on Timing}{88}
\contentsline {subsection}{\numberline {5.13.8}Benchmarking Techniques}{89}
\contentsline {chapter}{\numberline {6}UNIX Interface}{90}
\contentsline {section}{\numberline {6.1}Reading the Command Line}{90}
\contentsline {section}{\numberline {6.2}Useful Variables}{91}
\contentsline {section}{\numberline {6.3}Lisp Equivalents for C Routines}{91}
\contentsline {section}{\numberline {6.4}Type Translations}{92}
\contentsline {section}{\numberline {6.5}System Area Pointers}{92}
\contentsline {section}{\numberline {6.6}Unix System Calls}{93}
\contentsline {section}{\numberline {6.7}File Descriptor Streams}{93}
\contentsline {section}{\numberline {6.8}Making Sense of Mach Return Codes}{94}
\contentsline {section}{\numberline {6.9}Unix Interrupts}{94}
\contentsline {subsection}{\numberline {6.9.1}Changing Interrupt Handlers}{95}
\contentsline {subsection}{\numberline {6.9.2}Examples of Signal Handlers}{96}
\contentsline {chapter}{\numberline {7}Event Dispatching with SERVE-EVENT}{97}
\contentsline {section}{\numberline {7.1}Object Sets}{97}
\contentsline {section}{\numberline {7.2}The SERVE-EVENT Function}{98}
\contentsline {section}{\numberline {7.3}Using SERVE-EVENT with Unix File Descriptors}{98}
\contentsline {section}{\numberline {7.4}Using SERVE-EVENT with the CLX Interface to X}{99}
\contentsline {subsection}{\numberline {7.4.1}Without Object Sets}{99}
\contentsline {subsection}{\numberline {7.4.2}With Object Sets}{100}
\contentsline {section}{\numberline {7.5}A SERVE-EVENT Example}{100}
\contentsline {subsection}{\numberline {7.5.1}Without Object Sets Example}{100}
\contentsline {subsection}{\numberline {7.5.2}With Object Sets Example}{102}
\contentsline {chapter}{\numberline {8}Alien Objects}{105}
\contentsline {section}{\numberline {8.1}Introduction to Aliens}{105}
\contentsline {section}{\numberline {8.2}Alien Types}{105}
\contentsline {subsection}{\numberline {8.2.1}Defining Alien Types}{106}
\contentsline {subsection}{\numberline {8.2.2}Alien Types and Lisp Types}{106}
\contentsline {subsection}{\numberline {8.2.3}Alien Type Specifiers}{106}
\contentsline {subsection}{\numberline {8.2.4}The C-Call Package}{107}
\contentsline {section}{\numberline {8.3}Alien Operations}{108}
\contentsline {subsection}{\numberline {8.3.1}Alien Access Operations}{108}
\contentsline {subsection}{\numberline {8.3.2}Alien Coercion Operations}{108}
\contentsline {subsection}{\numberline {8.3.3}Alien Dynamic Allocation}{109}
\contentsline {section}{\numberline {8.4}Alien Variables}{109}
\contentsline {subsection}{\numberline {8.4.1}Local Alien Variables}{109}
\contentsline {subsection}{\numberline {8.4.2}External Alien Variables}{110}
\contentsline {section}{\numberline {8.5}Alien Data Structure Example}{110}
\contentsline {section}{\numberline {8.6}Loading Unix Object Files}{111}
\contentsline {section}{\numberline {8.7}Alien Function Calls}{112}
\contentsline {subsection}{\numberline {8.7.1}The alien-funcall Primitive}{112}
\contentsline {subsection}{\numberline {8.7.2}The def-alien-routine Macro}{113}
\contentsline {subsection}{\numberline {8.7.3}def-alien-routine Example}{113}
\contentsline {subsection}{\numberline {8.7.4}Calling Lisp from C}{114}
\contentsline {section}{\numberline {8.8}Step-by-Step Alien Example}{114}
\contentsline {chapter}{\numberline {9}Interprocess Communication under LISP}{117}
\contentsline {section}{\numberline {9.1}The REMOTE Package}{117}
\contentsline {subsection}{\numberline {9.1.1}Connecting Servers and Clients}{117}
\contentsline {subsection}{\numberline {9.1.2}Remote Evaluations}{118}
\contentsline {subsection}{\numberline {9.1.3}Remote Objects}{119}
\contentsline {subsection}{\numberline {9.1.4}Host Addresses}{120}
\contentsline {section}{\numberline {9.2}The WIRE Package}{120}
\contentsline {subsection}{\numberline {9.2.1}Untagged Data}{120}
\contentsline {subsection}{\numberline {9.2.2}Tagged Data}{121}
\contentsline {subsection}{\numberline {9.2.3}Making Your Own Wires}{121}
\contentsline {section}{\numberline {9.3}Out-Of-Band Data}{121}
\contentsline {chapter}{\numberline {10}Debugger Programmer's Interface}{123}
\contentsline {section}{\numberline {10.1}DI Exceptional Conditions}{123}
\contentsline {subsection}{\numberline {10.1.1}Debug-conditions}{123}
\contentsline {subsection}{\numberline {10.1.2}Debug-errors}{124}
\contentsline {section}{\numberline {10.2}Debug-variables}{124}
\contentsline {section}{\numberline {10.3}Frames}{125}
\contentsline {section}{\numberline {10.4}Debug-functions}{126}
\contentsline {section}{\numberline {10.5}Debug-blocks}{128}
\contentsline {section}{\numberline {10.6}Breakpoints}{128}
\contentsline {section}{\numberline {10.7}Code-locations}{129}
\contentsline {section}{\numberline {10.8}Debug-sources}{130}
\contentsline {section}{\numberline {10.9}Source Translation Utilities}{131}
\contentsline {chapter}{Function Index}{132}
\contentsline {chapter}{Variable Index}{135}
\contentsline {chapter}{Type Index}{136}
\contentsline {chapter}{Concept Index}{137}